package com.oraclechain.pocketeos.coin;

import com.oraclechain.pocketeos.base.Constants;
import com.oraclechain.pocketeos.blockchain.WalletAccountType;

import java.io.Serializable;

public abstract class BaseCoin implements Serializable {
    protected String contract = Constants.EOSCONTRACT;

    public abstract int getPrecision();

    public abstract String getSymbol();

    public abstract CoinType getType();

    public abstract String getContract();


    public abstract WalletAccountType getWalletType();

    public abstract String getIconRes();

    //管理界面图标
    public abstract int getManagerIconResId();

    public abstract boolean isVote();


    public abstract String getName();

    //缓存的服务器地址的SP的KEY
    public abstract String getSpServerKey();

    //缓存的节点地址
    public abstract String getCoinServer();

    public abstract String getBlockchain();

    public abstract String getBalance();

    public abstract String getPrice();

    //缓存数量
    public String mCurrentAmount = "0.00";
    //缓存价格
    public String mCurrentPrice = "0.00";

    public void setContract(String contract) {
        this.contract = contract;
    }

    public String getServerUrl(String key, String defaultUrl) {
//        String url = SPUtils.getInstance().getString(key);
//        if (!TextUtils.isEmpty(url) && !url.equals("")) {
//            return url;
//        } else {
            return "sss";
//        }
    }
}
